/**
 * 2015-12-21
 * StudentBean.java
 * author:sherlochao
 */
package com.sherlochao.beans;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Id;

import com.sherlochao.model.Course;
import com.sherlochao.model.StudyCourse;
import com.sherlochao.model.Teacher;

/**
 * @author yinchao
 *
 */
public class StudentBean {

	private String studentId;

	private String studentName;

	private String studentBirthdate; 

	private int count;
	
	private ArrayList<String> courses = new ArrayList<String>() ;
	
	private ArrayList<Double> scores = new ArrayList<Double>();
	
	private ArrayList<String> teachers = new ArrayList<String>();

	public StudentBean() {
		super();
	}

	public String getStudentId() {
		return studentId;
	}

	public void setStudentId(String studentId) {
		this.studentId = studentId;
	}

	public String getStudentName() {
		return studentName;
	}

	public void setStudentName(String studentName) {
		this.studentName = studentName;
	}

	public String getStudentBirthdate() {
		return studentBirthdate;
	}

	public void setStudentBirthdate(String studentBirthdate) {
		this.studentBirthdate = studentBirthdate;
	}

	public int getCount() {
		return count;
	}

	public void setCount(int count) {
		this.count = count;
	}

	public ArrayList<String> getCourses() {
		return courses;
	}

	public void setCourses(List<Course> courses) {
		for(int i= 0 ;i < courses.size() ;i++){
			this.courses.add(courses.get(i).getCourseName());
		}
	}

	public ArrayList<Double> getScores() {
		return scores;
	}

	public void setScores(List<StudyCourse> studyCourses) {
		for(int i= 0 ;i < studyCourses.size() ;i++){
			this.scores.add(studyCourses.get(i).getScore());
		}
	}

	public ArrayList<String> getTeachers() {
		return teachers;
	}

	public void setTeachers(List<Teacher> teachers) {
		for(int i= 0 ;i < teachers.size() ;i++){
			this.teachers.add(teachers.get(i).getTeacherName());
		}
	}

}
